package Work3;


import java.util.Arrays;
import java.util.Scanner;

public class Pro3{
   
	public static void main(String[] args) {
	Scanner in = new Scanner(System.in);
	Rectangle r[]  = new Rectangle[2];
	Circle c[] = new Circle[2];
	int x,y;
	int totalArea = 0;
	int totalPerimeter = 0;
    for(int i = 0 ;i < 2; i++){
    	if (in.hasNextInt()) {x = in.nextInt();
           y = in.nextInt();
    	r[i] = new  Rectangle(x,y);
    	//totalPerimeter += r[i].getPerimeter();
    	totalArea += r[i].getArea();
    	}
    }
    for(int i = 0 ;i < 2; i++){
    	if (in.hasNextInt()) 
    	{
    	x = in.nextInt();
    	c[i] = new  Circle(x);
    	//totalPerimeter += c[i].getPerimeter();
    	totalArea += c[i].getArea();
    	}
    }
    System.out.println(totalPerimeter);
    System.out.println(totalArea);
    System.out.println(Arrays.deepToString(r));
    System.out.println(Arrays.deepToString(c));
	}

}

 class Rectangle extends Shape{
	private int width;
	private int length;
	Rectangle(int width,int length){
		this.width = width;
		this.length = length;
	}
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public double getPerimeter(){
		double perimeter = (double)( this.width * 2 + this.length *2);
		return perimeter;
	}
	public double getArea(){
		double area = this.width * this.length;
		return area;
	} 
	public String toString() {
		return "Rectangle [width=" + this.width + ", length="
				+ this.length + "]";
	}
}

class Circle extends Shape{
	private int radius;
	Circle(int radius){
		this.radius = radius;
	}
	public double getPerimeter(){
		double perimeter = (double)(Shape.PI * this.radius * 2);
		return perimeter;
	}
	public double getArea(){
		double area =  (double)(Shape.PI * this.radius *this.radius);
		return area;
	} 	

	public int getRadius() {
		return radius;
	}
	public void setRadius(int radius) {
		this.radius = radius;
	}
	public String toString() {
		return "Circle [radius=" + this.radius + "]";
	}

}